var express = require('express');
var router = express.Router();
const{ getAdresses_2, modifyAddress_2 } = require("../service/addressesService.js")
/* GET home page. */
// 获取收货地址信息
router.get('/getAdresses', async function(req, res, next) {
    console.log(req.query);
    let result = await getAdresses_2(req.query);
    res.send(result);
});

// 通过ID修改收货地址
router.post('/modifyAddress', async function(req, res, next) {
    console.log(req.body);
    res.send(await modifyAddress_2(req.body));
    // let result = await getAdresses_2(req.query);
    // res.send(result);
});

module.exports = router;
